Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

GetPlayerFromCharacter not working?

Asked by
Async_io 908 Moderation Voter
8 years ago
tool = script.Parent
handle = tool:WaitForChild('Handle')
event = tool:WaitForChild('RemoteEvent')
swingtime = 1 
combowindow = 1
combo = 0
wait(1)
character = tool.Parent
player = game.Players:GetPlayerfromCharacter(character)

that's the chunk of code I'm having issues with I keep getting this error:

18:17:33.809 - GetPlayerfromCharacter is not a valid member of Players
18:17:33.810 - Script 'Players.Player1.Backpack.Black.Script', Line 9
18:17:33.811 - Stack End

And I typed this script out while watching one of stickmasterluke's videos on how to make a custom sword. I checked 20 times, and it's still the same as in the video, yet he has no errors.

Answer this question