#Cant figure out remote event
13 messages · Page 1 of 1 (latest)
i’ve tried. It works but only on server side but not the client side
As long as that part isn’t made by the client, it should be able to be used anywhere. There’s some good documentation on the touched event, so check it out if you’re interested: https://devforum.roblox.com/t/verifying-part-touches-via-the-client-for-client-side-interactions/359133
Every now and again, a question pops up on Scripting Support regarding handling part touches from the client. Two points are usually raised in these threads: the events are supposedly replicating despite being connected from the client, or that everyone’s seeing client-connected events. The intention of this thread is to clear the air about cli...
BRB gonna take a shower
Yes I would suggest making use of the Touched event directly
Where is this script located? and is it a script, modulescript, or localscript?
game.ReplicatedStorage.WallCollide.OnServerEvent:Connect(function(player)
local LeftWall = game.Workspace.Obby.LongWallTwo
local RightWall = game.Workspace.Obby.LongWallOne
local FrontWall = game.Workspace.Obby.ShortWallOne
local BackWall = game.Workspace.Obby.ShortwallOne
print("This is working!")
LeftWall.CanCollide = false
RightWall.CanCollide = false
FrontWall.CanCollide = false
BackWall.CanCollide = false
task.wait(2)
if game.Workspace.Obby.LongWallOne.CanCollide == true and game.Workspace.Obby.LongWallTwo.CanCollide == true and game.Workspace.Obby.ShortWallOne.CanCollide == true and game.Workspace.Obby.ShortWallTwo.CanCollide == true then
print("I hate this")
elseif game.Workspace.Obby.LongWallOne.CanCollide == false and game.Workspace.Obby.LongWallTwo.CanCollide == false and game.Workspace.Obby.ShortWallOne.CanCollide == false and game.Workspace.Obby.ShortWallTwo.CanCollide == false then
print("Finally")
end
end
end)
end)
same with this, location and type of script?
script.Parent.Touched:Connect(function(player)
game.ReplicatedStorage.WallCollide:FireServer()
end)
Like are any of the scripts inside a part/model, or serverscriptservice, or replciated storage?
Also seems like you have too many ```lua
end
```lua
game.ReplicatedStorage.WallCollide.OnServerEvent:Connect(function(player)
local LeftWall = game.Workspace.Obby.LongWallTwo
local RightWall = game.Workspace.Obby.LongWallOne
local FrontWall = game.Workspace.Obby.ShortWallOne
local BackWall = game.Workspace.Obby.ShortwallOne
LeftWall.CanCollide = false
RightWall.CanCollide = false
FrontWall.CanCollide = false
BackWall.CanCollide = false
task.wait(2)
if game.Workspace.Obby.LongWallOne.CanCollide == true
and game.Workspace.Obby.LongWallTwo.CanCollide == true
and game.Workspace.Obby.ShortWallOne.CanCollide == true
and game.Workspace.Obby.ShortWallTwo.CanCollide == true
then
print("I hate this")
elseif game.Workspace.Obby.LongWallOne.CanCollide == false
and game.Workspace.Obby.LongWallTwo.CanCollide == false
and game.Workspace.Obby.ShortWallOne.CanCollide == false
and game.Workspace.Obby.ShortWallTwo.CanCollide == false
then
print("Finally"=
end
end)
sorry i’m not home rn but the only non local script is this one
Do you know where they are located?
- local scripts dont work in workspace
- you can do touched event in server
- write workspace…., not game.Workspace
- use cycle for