✓ Accepted answer
Most of the time when people can't get things to work in Online mode that work in Studio, it's because they're using the wrong kind of script. Same case here.
Now, to fix the problem we would need to change this into a normal Script. The only problem with this is that you're not going to be able to access LocalPlayer. Here's a simple way to get around this:
1. Add an ObjectValue, and put this LOCALSCRIPT inside it:
script.Parent.Value = game.Players.LocalPlayer
2. Add a SCRIPT with the same parent as the ObjectValue. Now, put this code into the script:
repeat wait() until script.Parent.ObjectValue.Value
Player = script.Parent.ObjectValue.Value
function onButtonClicked()
wait(0.1)
Player:LoadCharacter()
Player.PlayerGui.Bloxikin.Frame.Visible = false
Player.PlayerGui.Flash.LocalScript.Disabled = false
end
script.Parent.MouseButton1Down:connect(onButtonClicked)
Now, this should work if you do it correctly. If you have any further questions, or I made a mistake, let me know in the comments. Hope I helped :P
1 comment
You can't use :LoadCharacter() from a localscript