Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a way to make a mount system where the whole server sees it?

I made one, It was client sided. heres what i did

local mount = false

if mount == true then
	local view = game.ServerStorage.Mount:Clone()
	view.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame
end

anyone know?

1 answer

✓ Accepted answer

you're gonna have to use some server sided scripting for the whole server to see it. Add a Event into your replicated storage and name it something. For example I will name it "ev" So in your local script you should have

local ev = game.ReplicatedStorage.ev
local mount = false

if mount == true then
	ev:FireServer()
end

Now your gonna have to make the server script. Server scripts can't do "Local player" but they do pick up on what player fired an even as the first piece of data sent in firing the event.

local ev = game.ReplicatedStorage.ev

ev.OnServerEvent:Connect(function(player)
	local view = game.ServerStorage.Mount:Clone()
	view.CFrame = player.Character.Torso.CFrame
end)

This should work, if not comment and I'll fix whatever error you're getting

2 comments

0

It works, but i get this error:

0

Never mind! it works, thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.