Пікірлер
@MonkeyJKL2
@MonkeyJKL2 Сағат бұрын
how do i make it loop?
@ligistinuswastaken
@ligistinuswastaken 2 сағат бұрын
only tutorial ive found that seriously actually worked. you have earned a new subscriber!
@grantking2389
@grantking2389 2 сағат бұрын
10:20 note to self
@offbrandluke_roblox
@offbrandluke_roblox 3 сағат бұрын
that’s really cool how you can change what you type to do sienthing
@Amoluss
@Amoluss 4 сағат бұрын
people in roblox before live move tracking:
@MrChicken-db1ms
@MrChicken-db1ms 4 сағат бұрын
idk why but it dosent even move for me?
@Someonesimplewastaken
@Someonesimplewastaken 6 сағат бұрын
How do you make it when ever you click a punch will happen. Like for instance if you click four times four different punch animations will play then there will be like a cooldown once you click four times. Let’s say if you click less then 4 times after some time like 2 seconds it resets and your back to the first punch. (I know it’s a lot but thanks)
@PeikenBoi
@PeikenBoi 6 сағат бұрын
my first script yall, pray for me😭 --Variables local part = Instance.new("Part") local sound = Instance.new("Sound") --Functions function PrintTouch() print("Part was touched!") end function PrintTouchEnd() print("Part is not being touched!") end function playsound() sound.Playing = true end function unanchor() part.Anchored = false part.BrickColor = BrickColor.new("Really red") end --Main script sound.SoundId = "rbxassetid://528432644" sound.Parent = part part.BrickColor = BrickColor.new("Lime green") part.Anchored = true part.Position = Vector3.new(0, 5, 5) part.Parent = workspace part.Touched:Connect(unanchor) part.Touched:Connect(PrintTouch) part.TouchEnded:Connect(PrintTouchEnd) part.Touched:Connect(playsound)
@DogeRobloxShorts
@DogeRobloxShorts 9 сағат бұрын
this it the error i got with the data save can somone tell me what's wrong? Workspace.Tycoons.SaveData:80: attempt to index nil with 'FindFirstChild' my data save: local Players = game:GetService("Players") local dataStoreService = game:GetService("DataStoreService") local dataStore = dataStoreService:GetDataStore("MyTycoonDataStore") function saveData(player) local tycoon = player:FindFirstChild("TycoonOwned").Value local purchases = player:FindFirstChild("TycoonOwned").Value.Purchases local tycoonData = {} spawn(function() local success, Error = pcall(function() dataStore:SetAsync(player.UserId.."-Cash", player.leaderstats.Cash.Value) end) if not success then warn(Error) end end) for i, object in ipairs(purchases:GetChildren()) do table.insert(tycoonData, object.Name) end local success, Error = pcall(function() dataStore:SetAsync(player.UserId, tycoonData) end) if not success then warn(Error) end local newTycoon = game.ServerStorage:FindFirstChild(tycoon.Name):Clone() newTycoon.Parent = tycoon.Parent tycoon:Destroy() end local function Buttons(button) button.Button.CanCollide = false button.Button.Transparency = 1 button.Button.BillboardGui.Enabled = false end script.Parent.ClaimTycoon.Event:Connect(function(tycoon) local tycoonOwner = tycoon.Values.OwnerValue.Value local tycoonData local cashData spawn(function() local success, Error = pcall(function() cashData = dataStore:GetAsync(tycoonOwner.UserId.."-Cash") end) if not success then warn(Error) end if success and cashData then tycoonOwner.leaderstats.Cash.Value = cashData end end) local success, Error = pcall(function() tycoonData = dataStore:GetAsync(tycoonOwner.UserId) end) if not success then warn(Error) end if success and tycoonData then local tycoonClone = game.ServerStorage:FindFirstChild(tycoon.Name):Clone() tycoonClone.Parent = tycoon.Parent tycoonClone.Values.OwnerValue.Value = tycoon.Values.OwnerValue.Value tycoonOwner.TycoonOwned.Value = tycoonClone tycoonClone.MainItems.OwnerDoor.Title.SurfaceGui.TextLabel.Text = tycoon.MainItems.OwnerDoor.Title.SurfaceGui.TextLabel.Text tycoon:Destroy() tycoon = tycoonClone local purchasesFolder = tycoonClone:FindFirstChild("Purchases") local purchasedItemsFolder = tycoonClone:FindFirstChild("PurchasedItems") local buttonsFolder = tycoonClone:FindFirstChild("Buttons") for i, button in pairs(buttonsFolder:GetChildren()) do if button:FindFirstChild("Object") then local object = purchasedItemsFolder:FindFirstChild(button.Object.Value) if object and table.find(tycoonData, object.Name) then object.Parent = purchasesFolder Buttons(button) end end end end end) Players.PlayerRemoving:Connect(function(player) saveData(player) end) game:BindToClose(function() for i, player in pairs(game.Players:GetPlayers()) do saveData(player) end end)
@DogeRobloxShorts
@DogeRobloxShorts 9 сағат бұрын
my core: my core: local Tycoon = script.Parent.Parent local mainItems = Tycoon:FindFirstChild("MainItems") local values = Tycoon:FindFirstChild("Values") local buttons = Tycoon:FindFirstChild("Buttons") local purchasedItems = Tycoon:FindFirstChild("PurcashedItems") local audio = Tycoon:FindFirstChild("Audio") local debounce = false local objects = {} local TweenService = game:GetService("TweenService") local random = Random.new() local BUILDING_ANIMATION_POSITION_OFFSET_AMOUNT = 2 local BUILDING_ANIMATION_PART_DELAY = 0.03 function hasProperty(instance, property) assert(typeof(instance) == "Instance") assert(typeof(property) == "string") local hasProperty = false pcall(function() local v = instance[property] hasProperty = true -- This line only runs if the previous line didn't error end) return hasProperty end function instanceListToPropertyDict(instances, propertyList) assert(typeof(instances) == "table") assert(typeof(propertyList) == "table") --[[Given a list of instances and a list of properties, construct a dictionary like so: dict = { [instance1] = {property1 = instance1.property1, property2 = instance1.property2, ...}, [instance2] = {property1 = instance2.property1, property2 = instance2.property2, ...}, ... }]] local dict = {} for _, instance in ipairs(instances) do local dictEntry = {} for _, property in pairs(propertyList) do assert(hasProperty(instance, property), string.format( [[Instance '%s' (a %s) doesn't have property '%s'.]], tostring(instance), instance.ClassName, property) ) dictEntry[property] = instance[property] end dict[instance] = dictEntry end return dict end function getDescendantsWhichAre(ancestor, className) assert(typeof(ancestor) == "Instance") assert(typeof(className) == "string") --[[Returns all descendants of ancestor which are of class className or a class that inherits from className]] local descendants = {} for _, descendant in pairs(ancestor:GetDescendants()) do if descendant:IsA(className) then table.insert(descendants, descendant) end end return descendants end function animateBuildingIn(buildingModel, tweenInfo) assert(typeof(buildingModel) == "Instance" and buildingModel.ClassName == "Model", string.format( "Invalid argument #1 to 'animateBuildingIn' (Model expected, got %s)", typeof(buildingModel) == "Instance" and buildingModel.ClassName or typeof(buildingModel) )) assert(typeof(tweenInfo) == "TweenInfo", string.format( "Invalid argument #1 to 'animateBuildingIn' (TweenInfo expected, got %s)", typeof(tweenInfo) )) --Collect BaseParts and original properties local parts = getDescendantsWhichAre(buildingModel, "BasePart") local originalProperties = instanceListToPropertyDict(parts, {"Transparency", "CFrame", "Color", "Size"}) local originalBasePartCFrame = buildingModel.PrimaryPart.CFrame --Make parts invisible and randomly move them for _, part in pairs(parts) do part.Transparency = 1 part.Color = Color3.fromRGB(255, 255, 255) part.Size = Vector3.new() local positionOffset = Vector3.new(random:NextNumber(-1, 1), random:NextNumber(-0.25, 1.75), random:NextNumber(-1, 1)) * BUILDING_ANIMATION_POSITION_OFFSET_AMOUNT local rotationOffset = CFrame.Angles(random:NextNumber(-math.pi, math.pi), random:NextNumber(-math.pi, math.pi), random:NextNumber(-math.pi, math.pi)) part.CFrame *= CFrame.new(positionOffset) * rotationOffset end --Tween them back to their original state, one at a time local lastTween --Return this so the caller can do animateBuilding(...):Wait() to wait for the animation to complete for _, part in pairs(parts) do local tween = TweenService:Create(part, tweenInfo, originalProperties[part]) lastTween = tween tween.Completed:Connect(function(playbackState) --Sometimes Tweens stop before reaching their goal properly. -- Make sure each Part is exactly how it was before. part.Transparency = originalProperties[part].Transparency part.CFrame = originalProperties[part].CFrame end) tween:Play() wait(BUILDING_ANIMATION_PART_DELAY) end return lastTween.Completed end mainItems.OwnerDoor.Door.Touched:Connect(function(hit) if values.OwnerValue.Value == nil then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then if player:FindFirstChild("HasTycoon").Value == false then values.OwnerValue.Value = player mainItems.OwnerDoor.Title.SurfaceGui.TextLabel.Text = tostring(values.OwnerValue.Value).. "'s Tycoon" player:FindFirstChild("TycoonOwned").Value = Tycoon Tycoon.Parent.ClaimTycoon:Fire(Tycoon) end end end end) function playSound(object, soundID) if object:FindFirstChild("Sound") then return else local sound = Instance.new("Sound", object) sound.SoundId = soundID sound:Play() sound.Ended:Wait() sound:Destroy() end end if buttons then for i, v in pairs(buttons:GetChildren()) do spawn(function() if v:FindFirstChild("Button") then local newObject = purchasedItems:FindFirstChild(v.Object.Value) if newObject ~= nil then objects[newObject.Name] = newObject:Clone() newObject:Destroy() else v:Destroy() end if v:FindFirstChild("Dependency") then v.Button.Transparency = 1 v.Button.CanCollide = false v.Button.BillboardGui.Enabled = false coroutine.resume(coroutine.create(function() if Tycoon.Purchases:WaitForChild(v.Dependency.Value) then v.Button.Transparency = 0 v.Button.CanCollide = true v.Button.BillboardGui.Enabled = true end end)) end v.Button.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then if values.OwnerValue.Value == player then if v.Button.CanCollide == true then if player:FindFirstChild("leaderstats").Cash.Value >= v.Price.Value then player.leaderstats.Cash.Value -= v.Price.Value objects[v.Object.Value].Parent = Tycoon.Purchases playSound(v, audio.sound1.SoundId) v:Destroy() else playSound(v, audio.sound2.SoundId) end end end end end) end Tycoon.Purchases.ChildAdded:Connect(function(add) animateBuildingIn(Tycoon.Purchases:FindFirstChild(v.Object.Value), TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out)):Wait() end) end) end end mainItems.CashCollector.Button.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil then if values.OwnerValue.Value == player then if player.Character.Humanoid.Health > 0 then if debounce == false then debounce = true mainItems.CashCollector.Button.BrickColor = BrickColor.new("Really red") player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + values.MoneyValue.Value values.MoneyValue.Value = 0 playSound(mainItems.CashCollector, audio.Cash2.SoundId) task.wait(0.8) mainItems.CashCollector.Button.BrickColor = BrickColor.new("Lime green") debounce = false end end end end end)
@KV_OYUNYT
@KV_OYUNYT 9 сағат бұрын
i enter wrong ):
@kaapeli_tv37
@kaapeli_tv37 12 сағат бұрын
bad tutorial!
@darkmatterdragon2657
@darkmatterdragon2657 13 сағат бұрын
i needed to revise some stuff but still great tutorial
@Cyphalopod
@Cyphalopod 14 сағат бұрын
W content
@husky_games_123
@husky_games_123 18 сағат бұрын
here is the code local Animation = script.Animation local humanoid = script.Parent.Humanoid local AT = humanoid:LoadAnimation(Animation) AT:Play()
@avyukth3727
@avyukth3727 18 сағат бұрын
Hi Rusty, while the gun works excellently, there's a problem thats probably a bug, but idk While the gun can get headshots and everything on dummies from the toolbox, when I spawn a rig with studio's built in "Rig Builder" and I aim at the head, it prints "Handle" as the instance I cant post an issue in devforum yet (rip) so im asking you whether you know why. Thanks!
@Extreme_Station1743
@Extreme_Station1743 21 сағат бұрын
OMG THANK YOU BRO YOUR A LEGEND 😭😭😭☹️🎉🎉🎉👍👍👍👍👍 I SUBBED👍👍
@Greenvon
@Greenvon 22 сағат бұрын
Help me how do I animate 2 dummy's at the same time to make a fight animation plz I subcribe❤
@noah_is_cool_number_1
@noah_is_cool_number_1 Күн бұрын
My mans, im havin trouble! it wont work! tell me if you want sses of the code.
@lulu3827
@lulu3827 Күн бұрын
This worked perfectly, thank you so much :)
@BOB-hy5nz
@BOB-hy5nz Күн бұрын
local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait() local humanoid = char:FindFirstChild("Humanoid") local bar = script.Parent local function updateHealth() local size = math.clamp(humanoid.Health / humanoid.MaxHealth,0,1) bar.Size = UDim2.new(size, 0, 1, 0) script.Parent.Parent.percentage.Text = tostring(math.floor(size * 100)).."%" end updateHealth() humanoid:GetPropertyChangedSignal("Health"):Connect(updateHealth) humanoid:GetPropertyChangedSignal("MaxHealth"):Connect(updateHealth)
@BOB-hy5nz
@BOB-hy5nz Күн бұрын
thank you so much
@Trevxdurg
@Trevxdurg Күн бұрын
What do I do if it doesn’t show me animation id
@BxGengar
@BxGengar Күн бұрын
It didn't work I clicked run and nothing happened
@Serzye
@Serzye Күн бұрын
6:15 someone please help the Color wheel thing isn’t popping up in really stuck !
@anthonysmechanics
@anthonysmechanics Күн бұрын
This helped me so much but when I walk it faces the wrong way. How do I fix that?
@realBoba_
@realBoba_ Күн бұрын
mine dosent work......
@LiminalGuide
@LiminalGuide Күн бұрын
You don’t have to put it in a variable though do you? Like can you just say “game.workspace.SpawnLocation:Destroy()”
@patatapir2476
@patatapir2476 Күн бұрын
local UserInputService = game:GetService("UserInputService") local runService = game:GetService("RunService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local playerGui = player.PlayerGui local Stamina = 100 local MaxStamina = 100 local speedDifference = 8 local drainRate = 20 local refreshRate = 10 local StaminaRefresh = 20 local sprintHeld = false local sprinting = false local exhausted = false local function sprint(active) if exhausted then return end humanoid.WalkSpeed = active and humanoid.WalkSpeed + speedDifference or humanoid.WalkSpeed - speedDifference sprinting = active end local function onInput(input) if input.KeyCode == Enum.KeyCode.LeftShift and input.UserInputType ~= Enum.UserInputType.Gamepad1 then sprintHeld = input.UserInputState == Enum.UserInputState.Begin sprint(sprintHeld) end end local function updatestaminaUI() playerGui.StaminaGUI.StaminaFrame.StaminaBar.Size = UDim2.new(math.clamp(Stamina / MaxStamina,0,1),0,1,0) playerGui.StaminaGUI.StaminaFrame.Percentage.Text = tostring(math.floor(Stamina)) .."/".. tostring(math.floor(MaxStamina)) end UserInputService.InputBegan:Connect(onInput) UserInputService.InputBegan:Connect(onInput) runService.Heartbeat:Connect(function(deltaTime) if sprinting then Stamina = math.max(0, Stamina - drainRate * deltaTime) updatestaminaUI() print(math.floor(Stamina)) if Stamina == 0 then sprint(false) exhausted = true end else Stamina = math.min(100, Stamina + refreshRate + deltaTime) if Stamina >= StaminaRefresh then updatestaminaUI() exhausted = false print(math.floor(Stamina)) if sprintHeld then sprint(true) end end end end)
@NeonGDPSFabai
@NeonGDPSFabai Күн бұрын
bro i cant align the door with the floor
@mistercheese2471
@mistercheese2471 Күн бұрын
It doesn't work when I touch the entity but the jumpscare will repeat every time I die tho it wont dissaper. Got any clues? edit: now it disapper after 4 seconds but still when I Touch the entity it doesn't work and it shows either one frame of the animation or the end
@MielPante
@MielPante Күн бұрын
not gonna lie i am a beginner and this is the best tutorial i ever seen!
@iamHiroy
@iamHiroy Күн бұрын
Hi Rusty, whenever I try to make more than 3 buttons they show up eventhough they have a dependency, when the item that has to be purchased it's not, the other buttons just appear. Do you have any solution? Thanks!
@WillysStuff
@WillysStuff Күн бұрын
how do I animate the dummy when they have accessories?
@SG_Noob-fe3de
@SG_Noob-fe3de Күн бұрын
how to get free part counter without plugin put script in server script service,script: for i, v in pairs(game:GetDescendants()) do if v:IsA("BasePart") then print(i) end end
@0BSESSEDw1th
@0BSESSEDw1th Күн бұрын
My rig is inside of the wall?
@0BSESSEDw1th
@0BSESSEDw1th Күн бұрын
Yo, I’m a little bit autistic how do I leave the script page because when I press play, it sends me into the game and I don’t wanna be inside the game. I want to get out of the page. But I want this to save.😅
@campbellduncan8533
@campbellduncan8533 Күн бұрын
This made my day
@MrTimbit.
@MrTimbit. Күн бұрын
1:32
@user-is4wf8xg4q
@user-is4wf8xg4q 2 күн бұрын
I am confused
@MightyMuffin2
@MightyMuffin2 2 күн бұрын
my loading screen is getting stuck at 93% every single time. does anyone know how to fix this?
@alexle5357
@alexle5357 2 күн бұрын
how do I attack without players? what's the code to do it?
@user-gd8en1jk1g
@user-gd8en1jk1g 2 күн бұрын
did not work
@555NJ555
@555NJ555 2 күн бұрын
Here is the Code if anyone needs it or is having trouble local tycoon = script.Parent.Parent local mainItems = tycoon:FindFirstChild("MainItems") local values = tycoon:FindFirstChild("Values") mainItems.OwnerDoor.Door.Touched:Connect(function(hit) if values and values:FindFirstChild("OwnerValue") and values.OwnerValue.Value == nil then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then local hasTycoon = player:FindFirstChild("HasTycoon") if hasTycoon and hasTycoon.Value == false then values.OwnerValue.Value = player local titleLabel = mainItems.OwnerDoor.Title.SurfaceGui:FindFirstChild("TextLabel") if titleLabel then titleLabel.Text = tostring(values.OwnerValue.Value).."'s Tycoon" end end end end end)
@Soundstrings
@Soundstrings 2 күн бұрын
issue, head accessories seem to be stopping my gun from dealing headshot damage? such as, a rig where i have face covering, it deals standard body damage since the raycast hits the accessory rather than the head, is there any way i can get it to exclude the accessories?
@SyedAbdullahShah-oo4fc
@SyedAbdullahShah-oo4fc 2 күн бұрын
ME Scripting=easy 2 minutes later PC GO BOOM
@teddycyborg
@teddycyborg 2 күн бұрын
I dont know why but i have been trying to debug the game to try to fins the error but i cant find the error! This is the error that keep poping: Workspace.Tycoons.Tycoon.MainItems.ConveyorBelt.CashPart.Script:5: attempt to index nil with 'Value'
@realBoba_
@realBoba_ 2 күн бұрын
number 1, you are the best for making this, number 2, no script in desc?🥺
@Rexgamesofc
@Rexgamesofc 2 күн бұрын
It didn't work with me
@PatG-kl5lc
@PatG-kl5lc 2 күн бұрын
While doing this, I don't know if it was just me or when I did the :Play function it only played once. For those who want it to repeat forever (EX: Waving animation for a NPC) I found this script I made based of this useful (This is for a rig) local animation = script.Animation -- This is getting our animation from the script, make sure you use your own animation ids! local humanoid = script.Parent.Humanoid -- This is getting our humanoid from the dummy! local animTrack = humanoid:LoadAnimation(animation) -- This is loading our animation for the humanoid! local value = 5 -- This is setting a value to be used in a repeat funcion repeat -- This makes it go on forever animTrack:Play() -- This plays the animation wait(3) -- This waits for however long (Must be longer than one, you can change it) until -- This is until when? value == 4 -- This is until our value = 4, which it never will be! It will therefore repeat forever. I know this script is un-optimized, and if there are any suggestions I will take them glady (Also I'm a idiot so if I missed a big part of this script or something just tell me and I'll delete this comment, lol)
@Simuni
@Simuni 2 күн бұрын
thanks mr RUsty.. can you create video to create model character more realistik, my body arm and leg still BOX.. ^^