Is there any error in the console/output?
No there is no error in the output
My given script should be working unless you put the scripts in wrong position.
Ok heres where I put them:
Server Script: Inside prozimity script
Localscript: inside StarterPlayerScripts
But it also prints “test–1” but why dosent it do the other stuff?
if it prints out that means theres a problem in the Bridge2. But let me ask what is the Bridge2 look like. show us please.
But I checked and Bridge (the main one) isn’t can collide
I will try to replicate it. wait for my respond.
It’s working for me
Here’s what I did:
Explorer:
Server Script below the Proximity Prompt Contains these:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local Proximity = script.Parent
Proximity.Triggered:Connect(function(playerWhoTriggered)
RemoteEvent:FireClient(playerWhoTriggered)
end)
RemoteEvent inside the ReplicatedStorage:
LocalScript that will handle the FiredClient from RemoteEvent (And it contains):
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local Bridge = workspace:WaitForChild("Barrier")
local Bridge2 = workspace:WaitForChild("Bridge2")
RemoteEvent.OnClientEvent:Connect(function()
print("YO FIRED!!!")
Bridge2.CanCollide = true
Bridge2.Transparency = 0
Bridge.CanCollide = false
end)
Experimenting:
Barrier being CanCollide = true and Bridge being Transparency = 1 (Before triggered):
While Triggering:
After Triggered (Bridge becomes visible and barrier becomes CanCollide = false):
P.S: forgot to walk into Barrier to see if I can get through to it. but it works.