I got the script to do what I wanted at first then tried to use math.random. Now when I try to run it, is says something like " ')' expected to close" and whenever I try to place is somewhere it has a red line.~~~~~~~~~~~~~~~~~
local player = game.Players.LocalPlayer
local tramp = game.Workspace["tramp"]
while true do
tramp.Touched:Connect(function(Hit)
if Hit then
wait(1)
trick = math.random(1,2)
if trick == 1 then
local animation = Instance.new("Animation")
animation.AnimationId="rbxassetid://1891421869"
local ActPlay = player.Character.Humanoid:LoadAnimation(animation)
ActPlay:Play()
elseif
trick == 2 then
local animation = Instance.new("Animation")
animation.AnimationId="rbxassetid://1977977345"
local ActPlay = player.Character.Humanoid:LoadAnimation(animation)
ActPlay:Play()
end
end
end

1 comment
Thanks