This is the server script in Serverscriptservice
game.Players.PlayerAdded:connect(function(player)
local event = Instance.new("RemoteEvent")
event.Name = "ChangePlotPositionEvent"
event.Parent = player
event:FireServer()
end)
and this is the local script in starter playerscripts
game.Players.LocalPlayer:WaitForChild("ChangePlotPositionEvent").OnClientEvent:connect(function(player)
print("PlayerAdded")
local Lastplot = game.ReplicatedStorage:WaitForChild("LastPlot")
local GameValues = Instance.new("Folder",player)
GameValues.Name = "GameValues"
local Plot = Instance.new("IntValue",GameValues)
Plot.Name = "Plot"
Plot.Value = Lastplot.Value + 1
game.ReplicatedStorage.RemoteFunctions.Plot.ChangePlotPositionEvent:FireServer(Plot)
local PlotClone = game.ReplicatedStorage.newbase:Clone()
PlotClone.Parent = game.Workspace
PlotClone.Name = player.Name.."'s Plot"
PlotClone.CFrame = CFrame.new(Vector3.new(-138.5, -18.5+Plot.Value* 50,178))
end)
No Errors. Just not working

1 comment
Filtering Enabled is not fun.