Hey everyone!
I’ve been working on a Fishing Rod system and, it worked in my test place, but, all of a sudden when I import it into a game, it’s not working?
Here’s my script:
script.Parent.Values.AbleToThrow.Value = true
script.Parent.Activated:Connect(function(hit)
if game.Players:GetPlayerFromCharacter(script.Parent.Parent) then
if script.Parent.Values.AbleToThrow.Value == true then
--now, to add some function to this Fishing Rod.--
local h = script.Parent.Parent:WaitForChild("Humanoid")
local animTrack = h:LoadAnimation(script.Parent.Throw)
animTrack:Play()
script.Parent.Values.AbleToThrow.Value = false
script.Parent.Events.ShortenLine:Fire()
wait(1.5)
animTrack:AdjustSpeed(0)
elseif script.Parent.Values.AbleToThrow.Value == false then
if script.Parent.Values.UnAvailableClicks.Value ~= 10 then
print("Player has clicked the fishing rod again.")
script.Parent.Values.UnAvailableClicks.Value = script.Parent.Values.UnAvailableClicks.Value + 1
elseif script.Parent.Values.UnAvailableClicks.Value == 10 then
game.Players:GetPlayerFromCharacter(script.Parent.Parent):Kick("Kicked for unexpected client behaviour. (Possible autoclicker)")
end
end
else
warn("not available to activate, Fishing Rod is being destroyed in 5 seconds.")
wait(5)
script.Parent:Destroy()
end
end)
And a GIF clip of my Test Place:
http://bit.ly/2xNH8LQ
Finally, my main map (where it was imported):
Any help is appreciated. Thanks so much!