okay before you refer me to the wiki (LOL), I have been though the wiki front and backk but still cannot get it right. They show how to make certain scripts FE compatible but not the way im trying to do it.
So basically I have it so that when you step on a brick a screen gui pops up. Here is the script I have (BTW it works with FE off);
Script inserted in Brick
local Part = script.Parent
Part.Touched:connect(function (HIT)
local H = HIT.Parent:FindFirstChild ("Humanoid")
if H then
Player = game.Players: GetPlayerFromCharacter(HIT.Parent)
Player.PlayerGui.ScreenGui.Box.Visible = true
end
end)
Please help me out with this, it is driving me crazy. Also I know I have to make a local script and a sever script along with a remote event but I just cannot figure out where to place what.
Also I have tried this but it doesnt work
LocalScript
local open = game.Workspace["Floor Brick"]
open.Touched:connect(function()
open.Script.Open:FireServer()
end)
Server Script
local Part = script.Parent
Part.Touched.OnServerEvent:connect(function (HIT)
local H = HIT.Parent:FindFirstChild ("Humanoid")
if H then
Player = game.Players: GetPlayerFromCharacter(HIT.Parent)
Player.PlayerGui.ScreenGui.Box.Visible = true
end
end)

1 comment
Just make the normal on hit script and stuff, but then after (if H then) you would want to fire the server script (everything below (if H then))