Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My lightbeam cant be seen by other players??

Asked by 6 years ago
Edited 6 years ago

so i tested my script in studio, but other players cant see it cause its a local script. Is there anyway to let other people see it in a local script?

001local Tool = script.Parent
002local player = game:GetService("Players").LocalPlayer
003local Character = player.Character
004 
005local en = true
006Tool.Equipped:Connect(function(mouse)
007print("Tool equipped!")
008if not en then return end
009 en = false
010Tool.RemoteEvent:FireServer(mouse.Hit)
011wait(.5)
012 en = true
013 
014Tool.Activated:Connect(function()
015    print("Mouse pressed!")
View all 104 lines...
0
Use remote events to create it from a server script mattscy 3725 — 6y
0
how SplendidKyle567 8 — 6y

1 answer

Log in to vote
0
Answered by
Hizar7 102
6 years ago

Hi, I haven't read all your script but to put this in a server script so players can see by using a remoteEvent is pretty simple, just have the script how it is in a local script, but when you go to do something you want players to see instead of writing that portion out, Example vv

1player.Light.Visable = true ---- << EXAMPLE

in the local script type

1game.ReplicatedStorage.RemoteEvent:FireServer()

then put the RemoteEvent in the replicatedstorage, then in your server script type

1game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
2player.Light.Visable = true --- << EXAMPLE

Sorry for not reading the script, but in reality it should be similar to this, let me know if it helped!

Ad

Answer this question