I am having trouble scripting for a game, It's about blocks that give you affects, that ware off after 10 seconds. This is the script I am using:
Script.Parent.Touched:Connect(function(hit) If hit.Parent:FindFirstChild(“Humanoid”) then game.Workspace[hit.Parent.Name].Humanoid.BodyHeightScale.Value = 0.5 end)
I do not get what is wrong, I just cant find the script that lowers the time to 10 seconds. Any help?
Thanks
I've never made something like this. But I am assuming you will have to do stuff with the humanoid root part
Heres a script that might help;
script.Parent.Touched:Connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then hit.Parent.Torso.Scale (number, number, number) hit.Parent.RightLeg.Scale (number, number, number) hit.Parent.LeftLeg.Scale (number, number, number) hit.Parent.RightArm.Scale (number, number, number) hit.Parent.LeftArm.Scale (number, number, number) hit.Parent.Head.Scale (number, number, number) end end)
(this is an r6 script)
you may have to edit it to get it how you like.
Hope it helped!