local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
script.PlayerName.Value = game.Players.LocalPlayer.Name
Mouse.KeyDown:connect(function(Key)
if Key:byte() == 32 then
if Player.Character.Parent ~= game.Workspace then
for _, descendant in pairs(game.Workspace.FlightModel:GetDescendants())do
if descendant.Name == script.PlayerName.Value then
descendant.Parent = game.Workspace
end
end
end
end
end)
COMMUNITY QUESTION
The localscript works in roblox solo mode and not in game/server?
1 answer
This is because you scriping doesn't include remoteEvents. RemoteEvents help tranfer data from server to client or client to server. We need to use the Event FireServer. Which will fire your script into the Server which well then be read and be fire into the client aka your game. This allows everyone to see whats going on in game. Here is a youtube video on the fowllowing. if you don't like Remote event you could go into your workspace and turn it off. But if will allow players to hack in your game. Hope i helped :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Quick Question, It doesn't even work in the client in game but works in roblox studio it the tutorial still going to help?
This tutoraial will help.