#Trying to send message from server to player.
246 messages · Page 1 of 1 (latest)
if not lockpick then
local tempSG = Instance.new("ScreenGUI")
tempSG.Parent = player.PlayerGui
local warning = Instance.new("TextLabel")
warning.Visible = false
warning.Parent = tempSG
--customize label
warning.Text = "no lockpick"
warning.Visible = true
task.wait(delay)
warning:Destroy()
tempSG:Destory()
end
very washed up
but that should work
i recommend adding a debounce btw
depending on if you have other local handlers it may be easier to use a rem event
oh
what should I define player as
you have to replace those
the player
that the warning is going to display on
it would be in
game.Players.{insert player}
also
i think some of the capitalization is incorrect
on my draft
:p
I want it to do it for every player that trys to lockpick the door without a lock pick not a single person
Nope
ok good
It is just script
can i see it
function onClicked(parent)
if active == true then
local lockpick = parent.Character:FindFirstChild('Lockpick')
if not lockpick then
if not lockpick then
local player = playerId
local tempSG = Instance.new("ScreenGUI")
tempSG.Parent = player.PlayerGui
local warning = Instance.new("TextLabel")
warning.Visible = false
warning.Parent = tempSG
--customize label
warning.Text = "no lockpick"
warning.Visible = true
task.wait(delay)
warning:Destroy()
tempSG:Destory()
end
return
end
active = false
tweenOpen:Play()
script.Parent.Unlock:Play()
print('bruh')
prompt.ObjectText = "Door"
prompt.ActionText = "Unlocked!"
wait(5)
tweenClose:Play()
active = true
prompt.ObjectText = "Lockpick?"
prompt.ActionText = "Locked"
end
end
script.Parent.ProximityPrompt.Triggered:Connect(onClicked)
one sec
all good take your time
there are 2 "if not lockpicks"s
function onClicked(parent)
if active == true then
local lockpick = parent.Character:FindFirstChild('Lockpick')
if not lockpick then
local player = playerId
local tempSG = Instance.new("ScreenGUI")
tempSG.Parent = player.PlayerGui
local warning = Instance.new("TextLabel")
warning.Visible = false
warning.Parent = tempSG
--customize label
warning.Text = "no lockpick"
warning.Visible = true
task.wait(delay)
warning:Destroy()
tempSG:Destory()
end
return
end
active = false
tweenOpen:Play()
script.Parent.Unlock:Play()
print('bruh')
prompt.ObjectText = "Door"
prompt.ActionText = "Unlocked!"
wait(5)
tweenClose:Play()
active = true
prompt.ObjectText = "Lockpick?"
prompt.ActionText = "Locked"
end
script.Parent.ProximityPrompt.Triggered:Connect(onClicked)
thx
if you want it without the code you gave me here is this
function onClicked(parent)
if active == true then
local lockpick = parent.Character:FindFirstChild('Lockpick')
if not lockpick then
-- TODO: Show error to user
return
end
active = false
tweenOpen:Play()
script.Parent.Unlock:Play()
print('bruh')
prompt.ObjectText = "Door"
prompt.ActionText = "Unlocked!"
wait(5)
tweenClose:Play()
active = true
prompt.ObjectText = "Lockpick?"
prompt.ActionText = "Locked"
end
end
script.Parent.ProximityPrompt.Triggered:Connect(onClicked)
oh ty thats better
Fire a remote event pick it up from a local script then have data tables that get sent then change the gui text or wherever to what the data is that you sent
hmm its been a while since i used prox prompts 💀
do you know if i can get the triggering player
Wdym?
oh ok
function onClicked(parent, player)
if active == true then
local lockpick = parent.Character:FindFirstChild('Lockpick')
if not lockpick then
local tempSG = Instance.new("ScreenGUI")
tempSG.Parent = player.PlayerGui
local warning = Instance.new("TextLabel")
warning.Visible = false
warning.Parent = tempSG
--customize label
warning.Text = "no lockpick"
warning.Visible = true
task.wait(delay)
warning:Destroy()
tempSG:Destory()
end
active = false
tweenOpen:Play()
script.Parent.Unlock:Play()
print('bruh')
prompt.ObjectText = "Door"
prompt.ActionText = "Unlocked!"
wait(5)
tweenClose:Play()
active = true
prompt.ObjectText = "Lockpick?"
prompt.ActionText = "Locked"
end
end
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
onClicked(nil, player)
end)
that should work
oops
nvm fixed it
assuming the proxPompt.Triggered returns the player
💀
Workspace.Lockpickable Door.Doorframe.Lock.Door:34: attempt to index nil with 'Character' - Server - Door:34
oh you removed return
Yea it prevents error
i didnt see what that returned
it just gets rid of it?
but the code still wont work
right
The og code works with return
oh ok
The code that you gave me is not giving me a prompt
OH
oops
forgot
i didnt know what the "parent" was for
so
when it runs the function
it gives parent nil
second last line
you should do something with that?
i dont understand what you need the parent for
The parent in onClicked function?
that allows it to find the lockpick in the player
OH
you should have said that earlier -_-
so
parent
is the player?
in game.players
** You are now Level 3! **
ok
function onClicked(parent)
if active == true then
local lockpick = parent.Character:FindFirstChild('Lockpick')
if not lockpick then
local tempSG = Instance.new("ScreenGUI")
tempSG.Parent = parent.PlayerGui
local warning = Instance.new("TextLabel")
warning.Visible = false
warning.Parent = tempSG
--customize label
warning.Text = "no lockpick"
warning.Visible = true
task.wait(delay)
warning:Destroy()
tempSG:Destory()
end
active = false
tweenOpen:Play()
script.Parent.Unlock:Play()
print('bruh')
prompt.ObjectText = "Door"
prompt.ActionText = "Unlocked!"
wait(5)
tweenClose:Play()
active = true
prompt.ObjectText = "Lockpick?"
prompt.ActionText = "Locked"
end
end
script.Parent.ProximityPrompt.Triggered:Connect(onClicked)
try that
Unable to create an Instance of type "ScreenGUI"
Workspace.Lockpickable Door.Doorframe.Lock.Door:47: invalid argument #1 to 'wait' (number expected, got function)
task.wait(delay)
OH
yeah
you can insert the delay you want
for it to disappear
wtvr u want
did it work tho?
did you get the "bruh"
bruh is only when you use the lockpick'
oh
if i add print right before delay
OH whoops
did you customize it?
you have to specify position and size and everythin
g
Explain exactly in detail what you are trying to do and I will fix it in a few mins
When the players attempts to open the door without a lockpick i want a gui message to apear saying You need a lockpick to pick this lock. Then I want it to fade away
uhm looks like they can take it from here?
i gtg sorry ill be back later
all good
👋
See ya
function onClicked(parent)
if active == true then
local lockpick = parent.Character:FindFirstChild('Lockpick')
if not lockpick then
-- TODO: Show error to user
return
end
active = false
tweenOpen:Play()
script.Parent.Unlock:Play()
print('bruh')
prompt.ObjectText = "Door"
prompt.ActionText = "Unlocked!"
wait(5)
tweenClose:Play()
active = true
prompt.ObjectText = "Lockpick Required"
prompt.ActionText = "Locked"
end
end
script.Parent.ProximityPrompt.Triggered:Connect(onClicked)
Og code
Thanks man!
Forgot to reply to that
This
Yea that is what I am trying to do
Dms
Yes
Not talking to u
We solved it in Dms
I'm talking to guy called ingunner
We solved it in Dms
It’s fixed and works
I'm talking to seperate man by diffirent user
And a non twitter kid
@waxen meteor any other issues if not please mark as solved.
Ok well if your going to be an ass then I just won’t talk to you he will say the same thing that we solved it in dms.
Don't talk then
Kindly Ur not part conversation I'm engaging on
So you would be doing me favour
Well I’m just trying to not waste your time by telling you it’s solved
8 pm for me lol you should go to bed
Being unproductive sleeping early
Leads to less developed mind
When you can be debugging, making databases, doing commissions, doing cyber sec, learning assembly to reverse engineer why waste Ur time sleeping
Ok Mr everything on the internet is true kid lol
I'm kid wouldn't be sure about that.
Wouldn't be sure at all if I was you.
Way older than some kid that's for sure
And I got expiernce in life considering I grew up in poor area
Ok lmao I don’t need your life story
Yeah and I don't need you talking still
You said you was gonna like ignore me bit back
I'm still waiting for that.
Well you don’t need to bug tf out of him which I am sure you where going to do.
Bug*
Lmao
Now sit down in Ur 200lbs chair support.
Refrain from typing to much you may burn phew calories
Now please refrain from typing sqeaky boy.
Now I shall join vc and harrass my irl friends while they play the forest and try to replicate sky bases in the forest
Squeaky? I was not even talking half the time that was somebody else lmao
Naw mic broken or something want be to record a vid for proof?
Uhu sure bucko lmfaooo
Man's in denial he's sqeaker
Grow tf up bro
Also how this mf get all his Roblox vids age restricted
Tf man's do on video
I purposely did that
And?
When did I call you a child?
Just cause my profile picture is anime
To blend in with you people
So discord doesn't ban me again
I could care less what your pfp is
What
I mean don't get me wrong discord banned me 41 times but I sure ain't no ped
I counted all bans quite phew
What did you get banned for?
Discrimination, malicious hacking, self bots bunch other stuff
Just multiplied phew times
Discrimination like 7x times
Including servers I was in what got banned for it
Makes sense
Discord mods are furries they class anything slightly wrong against there kind
As discrimination
It is solved
lmao wtf y'all get so heated over