So, the problem is that im trying to enable a script, but it doesnt...
Script (LOCALSCRIPT):
script.Parent.MouseButton1Click:Connect(function() **game.Workspace["The castle dungeon"].GuardF.Script.Disabled = false** script.Parent.Parent.Parent.HackyMouseMovementStuff.TextButton:Destroy() end)
Script that i want to enable:
local hum = script.Parent.Humanoid local Animation = Instance.new("Animation") local plyr = game:GetService('Players').LocalPlayer Animation.AnimationId = "rbxassetid://9320074412" print("Signal Successful!") local AnimationTrack = script.Parent.Humanoid:LoadAnimation(Animation) AnimationTrack.Priority = Enum.AnimationPriority.Action AnimationTrack.Looped = false AnimationTrack:Play() wait(0.6) script.Parent:Destroy()
Can anyone please help?
you cannot use LocalPlayer in a normal script. it looks like you are not even using your plyr variable so you can delete it.
If that does not work it is because you cant enable a script from a local script. Try using a Remote Event.