So in this script, I have a part that is stepped on. If the player steps on that part and presses the key "r", a value known as Int will become true.
script.Parent.Touched:connect(function(player)
plr = game.Players:GetPlayerFromCharacter(player.Parent)
mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "r" then
game.Workspace.Int.Value = true
end
end)
end)
For some reason, however, this script will only work in Play Solo mode, not Start Server or Published to Roblox. What did I do wrong? Is it a LUA glitch or my own error? As someone who doesn't know to much on LUA's technical side, I don't know what's wrong here. All answers appreciated, thank you. ~ Xduel
