New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

How to turn this script from client to server?

Asked by 5 months ago

how can i connect it from client to server

local Debris = game:service("Debris") local Tool = script.Parent local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() local Equipped = false local Activated = false local function MakePart(position) local sla ="Part") sla.Name = "Paint" sla.Size =,0.1,1) sla.BrickColor ="White") sla.Anchored = true sla.CanCollide = false sla.TopSurface = "Smooth" sla.BottomSurface = "Smooth" sla.CFrame = sla.Parent = Player.Character Debris:AddItem(sla, 10) end Tool.Equipped:connect(function(mouse) Equipped = true end) Tool.Unequipped:connect(function() Equipped = false end) Mouse.Button1Down:connect(function() if Equipped then Activated = true end end) Mouse.Button1Up:connect(function() Activated = false end) game:GetService("RunService").RenderStepped:connect(function() if Equipped and Activated then MakePart(Mouse.Hit.p) end end)
remote events/functions, look them up BashCaster 2676 — 5mo
i know this,but i cant make it. iBeatuEZ 27 — 5mo
remote events is the only way bud :( Unless you just make a script instead of a local script but you couldn't get the player from local player. You can make a remote event in replicated storage and in this local script you could fire the server on the remote event and pick it up in a script. Hope you understand! http_shawn 1 — 5mo

Answer this question