Gravestone Posted December 19, 2015 Share Posted December 19, 2015 (edited) *Fixed* Edited February 27, 2016 by Guest Link to comment
Dealman Posted December 19, 2015 Share Posted December 19, 2015 I'm sorry, but as far as I am aware, neither of us lingering these forums possess the magic to automatically know what is wrong with your script. Especially when you don't provide us with your code to help you. Link to comment
Gravestone Posted December 19, 2015 Author Share Posted December 19, 2015 (edited) *removed* Edited February 27, 2016 by Guest Link to comment
Dealman Posted December 19, 2015 Share Posted December 19, 2015 First issue I spotted with this script was this; local player = getPlayerFromNamePart(playername or "") if player then This if statement doesn't really do anything, it will always be true. Even if a player is not found via that name, you set it to "" instead of false - or nil. So player will always be either a player element or simply an empty string. It would never return false or nil, thus preventing possible errors when trying to use the player element later on. You could fix it like this; local player = getPlayerFromNamePart(playername) -- Or if(getElementType(player) == "player") then Second issue is this; setPlayerMuted(player, true, true, true, thePlayer, reason, duration) As far as I can tell, setPlayerMuted only has 2 arguments, not 7 - unless you made your own command. Try and see whether setPlayerMuted returns true or false. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now